﻿using System;
using System.Diagnostics;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EncryptionStuff
{
    class Program
    {
        char[] key = new char[10];
        char qou = '"';
        String x;
        bool wtc;
        static void Main(string[] args)
        {
            Program en = new Program();
            en.open();
            
        }
        public void open()
        {
            try
            {
                TextReader get = new StreamReader("key.txt");
                get.ReadLine();
                get.ReadLine();
                x = get.ReadLine();
                x = x.TrimStart(qou);
                x = x.TrimEnd(qou);
                key = x.ToCharArray();
                if(key.Length != 10)
                {
                    Console.WriteLine("INVALID KEY");
                    Console.WriteLine(key);
                    Console.WriteLine(key.Length);
                    System.Diagnostics.Debugger.Break();
                }
                get.Close();
            }
            catch (FileNotFoundException)
            {
                TextWriter get = new StreamWriter("key.txt");
                get.WriteLine("Encyrption Key file created: " + DateTime.Now);
                get.WriteLine("Keys are 10 charachters, Place below.");
                get.WriteLine("\"Keyhere\"");
                get.Close();
            }
        }
        public void ui()
        {
            //
        }
        public void decyrpt()
        {
            
        }
        public void encyrpt()
        {
            //
        }
    }
}
